﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using vashSMJ;
public class TestButtonInvoke : MonoBehaviour
{
    private GameObject buttonObj;
    void Start()
    {
        buttonObj = GameObject.Find("EventInvokeButton");
        buttonObj.GetComponent<Button>().onClick.AddListener(OnClick);
    }

    public void OnClick(){
        Debug.Log("在这里调用了注册的方法");
        EventManager.getInstance().publishEvent("button1Click");
    }

    void Update()
    {
        
    }
}
